-- GENERATED SPELL FOR [Blazing Trickster] --


function spell0_20905(pUnit, Event) --@Fire Shield,n/a--
pUnit:FullCastSpellOnTarget(36907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20905', 589, 1)
end

function spell1_20905(pUnit, Event) --@Firebolt,n/a--
pUnit:FullCastSpellOnTarget(36905,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20905', 1000, 1)
end

function spell2_20905(pUnit, Event) --@Firebolt,n/a--
pUnit:FullCastSpellOnTarget(36906,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20905', 1000, 1)
end

function spell3_20905(pUnit, Event) --@Firebolt,n/a--
pUnit:FullCastSpellOnTarget(39022,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20905', 1000, 1)
end

function spell4_20905(pUnit, Event) --@Firebolt,n/a--
pUnit:FullCastSpellOnTarget(39023,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20905', 1000, 1)
end

function Sorts_20905(pUnit, Event)
local choix_sorts_20905 = math.random(0, 4)
if choix_sorts_20905 == 0 then
pUnit:RegisterEvent('spell0_20905', 1, 1)
end
if choix_sorts_20905 == 1 then
pUnit:RegisterEvent('spell1_20905', 1, 1)
end
if choix_sorts_20905 == 2 then
pUnit:RegisterEvent('spell2_20905', 1, 1)
end
if choix_sorts_20905 == 3 then
pUnit:RegisterEvent('spell3_20905', 1, 1)
end
if choix_sorts_20905 == 4 then
pUnit:RegisterEvent('spell4_20905', 1, 1)
end
end

function mob20905_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20905', math.random(1500, 3000), 1)
end

function mob20905_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20905_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20905_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20905, 1, 'mob20905_Action')
RegisterUnitEvent(20905, 2, 'mob20905_Leave')
RegisterUnitEvent(20905, 3, 'mob20905_Kill')
RegisterUnitEvent(20905, 4, 'mob20905_Die')
